package de.wittje.games.mlpbd;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Locale;
import java.util.Properties;

import de.wittje.games.mlpbd.controller.ExternalizingController;
import de.wittje.games.mlpbd.view.windows.MainWindow;

public class Main {

	public static void main(String[] args) {

		try {
			Properties prop = new Properties();
			prop.load(new FileInputStream(System.getProperty("user.dir")
					+ "/data/config.properties"));
			ExternalizingController ec = new ExternalizingController(
					new Locale(prop.getProperty("language")));

			int width = Integer.valueOf(prop.getProperty("width"));
			int height = Integer.valueOf(prop.getProperty("height"));

			new MainWindow(ec, width, height);
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

}
